#pragma once

#include "SpeechRecognizer.h"

class GoogleSREngine : public SpeechRecognizer
{
public:
	GoogleSREngine();
	virtual ~GoogleSREngine();

	virtual bool initialize(void);
	virtual SRError recFromMic(int sessionID, const char* logWavFileName, SRNLUResult *result);
	virtual SRError recFromFile(const char* filename, SRNLUResult *result);
	virtual bool stopRecording(int sessionID);

	char *		fireGoogleSR(void);

protected:
	std::string m_proxyAddress;
	int			m_proxyPort;
	std::string m_proxyDomain;
	std::string m_proxyUser;
	std::string m_proxyPassword;
	bool		m_useProxy;
	std::string m_lang;
	int			m_nBest;

	std::string m_googleURL;
};

struct sprec_server_response {
	char *data;
	int length;
};
